package com.woniuxy.house.vo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * code:200成功；500失败；400不合法；
 *
 * @author baobo
 * @date 2022-08-29-10:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties("handler")
public class ResponseEntity<T> {

	private String code;//状态码code:200成功；500失败；400不合法；401无权限
	private String msg;//说明
	private T data;
	public static final ResponseEntity SUCCESS=new ResponseEntity<>("200","成功",null);
	public static final ResponseEntity FAIL=new ResponseEntity<>("500","失败",null);
	public static final ResponseEntity NO_VALID=new ResponseEntity<>("400","不合法",null);
	public static final ResponseEntity NO_PROM=new ResponseEntity<>("401","无权限",null);
}
